In recent years, realization of Internet of things (IoT) in which various devices and sensors are coupled to networks has been advanced. As a method for coupling these devices and sensors (hereinafter, also called “peripheral devices”) to networks, there is a method for directly coupling to the Internet via mobile phone networks and so forth. In addition, as another method, there is a case of coupling via smart devices such as smartphones and tablets, carried around by persons.
In a case of considering trying to provide an application (hereinafter, also called an “app” as an abbreviation of “application”) for coupling to, via a smart device, and using the peripheral devices, it is desirable to implement, in the app, communication protocols corresponding to these peripheral devices. In the communication protocols corresponding to the peripheral devices, there are parts specific to the respective devices. Therefore, in order to implement the communication protocols in the corresponding smart device, a device maker creates and provides an app to users in many cases. However, in this case, it is desirable to prepare an app for each of devices to be used, and it has a disadvantage for users.
Therefore, there is a method in which, in order to enable to access peripheral devices by using application programming interfaces (APIs), a device maker provides, to app developers, software modules in which parts specific to the respective peripheral devices are described. In, for example, the Device WebAPI Consortium, a method for creating device drivers in accordance with specifications of the consortium, thereby enabling an app to access devices via the WebAPI, is proposed and implemented.
In addition, as a form of an app provided in a smart device, there is a form called a hybrid app. The hybrid app is an app having, for example, a form in which both a web technology such as a hypertext markup language (HTML) or JavaScript (registered trademark) and a native language such as Java (registered trademark) or a C language are used. According to the hybrid app, a part desired to access APIs provided by an operating system (OS) is described by using the native language, and a part described by using the native language is accessed from the web technology. From this, it becomes possible to utilize the functions of the OS by using the web technology.
In other words, it is possible to describe, by using the native language, a part to access peripheral devices and to describe, by using the web technology, a large part of an app including user interfaces (UIs). In addition, from this, it becomes possible to use as one app on the smart device while not accessing the web technology by using a web browser. While a large number of web browsers are used in personal computers, the number of apps installed and used in smart devices is larger than the number of apps used via web browsers, in the smart devices. In view of such a background, there is important a form called the hybrid app, in which a developer, who has developed apps for web browsers by using a personal computer and who is acquainted with the web technology, is able to develop apps for smart devices.
Here, device drivers that access peripheral devices by using the above-mentioned APIs utilize the APIs provided by the OS. Therefore, it is desirable to describe the device drivers by using the native language. Since device drivers of a device to perform communication by using, for example, the Bluetooth (registered trademark) are desired to access APIs, related to the Bluetooth and provided by the OS, the device drivers are described by using the native language. Therefore, there is proposed a method for realizing, by using the native language, minimum functions used for accesses to devices and describing many portions of the device drivers by using the web technology. This method reduces an effort of creating an app to enable a terminal device to control an external device, the terminal device not being authorized to incorporate thereinto a device driver for control of the external device. Specifically, in this method, a general-purpose driver is preliminarily incorporated into the OS, and an application includes a driver library. The driver library is provided, by the application, with a first control instruction in a form recognizable by the application and converts the first control instruction into a second control instruction in a form able to be delivered to the external device. The general-purpose driver transmits, to the external device, the converted second control instruction output by the driver library.